package com.test;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.util.FileUtil;

public class DowloadActioin extends org.apache.struts.actions.DispatchAction {


	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		System.out.println("download.....");
		//FileUtil.downloadFile(request, response, "E:\\ebond2.0lib\\iReport.jar");
		//FileUtil.downloadFile(request, response, "E:\\ebond2.0lib\\spring.jar");
		boolean ok = FileUtil.downloadFile(response, "D:/tools/sogou_pinyin_42g.exe");
		System.out.println("download end....ok====+++++== = "+ok);

		return null;
	}

}
